#version 450 core

layout(triangles) in;
layout(line_strip, max_vertices = 6) out;

in Varyings
{
    vec3 normalCS;
} i[];

void generateNormal(int index)
{
    const float magnitude = 0.4;
    gl_Position = gl_in[index].gl_Position;
    EmitVertex();
    gl_Position = gl_in[index].gl_Position + vec4(i[index].normalCS * magnitude, 0.0);
    EmitVertex();
    EndPrimitive();
}

void main()
{
    generateNormal(0);
    generateNormal(1);
    generateNormal(2);
}
